using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Net;

namespace OA.Common
{
    /// <summary>
    /// 本机信息    
    /// Copyright (C) KaiYuanCms.com Email:Service@KaiYuanCms.com
    /// </summary>
    public class NativeInfo
    {
        #region 获取本地IP
        /// <summary>
        /// 获取本地IP
        /// </summary>
        /// <returns>返回IP地址</returns>
        public string GetIP() 
        {
            IPHostEntry ipHost = Dns.Resolve(Dns.GetHostName());
            IPAddress ipAddr = ipHost.AddressList[0];
            return ipAddr.ToString();
        }
        #endregion


    }
}
